package com.it.commicity.controller.zy;


import com.it.commicity.common.Result;
import com.it.commicity.domain.po.ZyBuilding;
import com.it.commicity.domain.po.ZyCommunity;
import com.it.commicity.service.zy.IZyBuildingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 楼栋  前端控制器
 * </p>
 *
 * @author author
 * @since 2025-07-11
 */
@RestController
@RequestMapping("/api/build")
public class ZyBuildingController {
    @Autowired
    private IZyBuildingService buildingService;

    /**
     * 获取小区信息
     *
     * @return
     */
    @GetMapping("/getAllCommunity")
    public Result<List<ZyCommunity>> getAllCommunity() {
        return buildingService.getAllCommunity();
    }

    @GetMapping("/getAllBuilding")
    public Result<List<ZyBuilding>> getAllBuilding() {
        return buildingService.getAllBuilding();
    }
}
